<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Douliusuo
  Date: 2022/4/28
  Time: 20:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>员工信息展示</title>
        <style>
            body{
                width: 100%;
                height: auto;
                background-color: #F5F5F5;
                margin: 0;
                padding: 0;
                background-image: url("/images/loginbg.png");
            }
            #div1{
                left: auto;
                width: 100%;
                height: auto;
                border-radius: 15px;
                background-color: paleturquoise;
                border: 1px solid #DCDCDC;
                /*设置背景图片*/
                background-image: url("/images/loginbg.png" );
            }
            #mytable{
                width: 100%;
                height: auto;
                /*设置边框*/
                border: 1px solid black;
                /*     设置圆角弧度*/
                border-radius: 15px;
                /*设置阴影*/
                box-shadow: 0 0 3px red;
                /*设置背景图片*/
                background-image: url("/images/loginbg.png" );
            }
            #mytable th{
            /*    字体居中*/
                position: center;
                text-align: center;
            }
            #mytable td{
                text-align: center;
            }

        </style>
        <%--引入bootstrap样式--%>
        <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
        <%--引入bootstrap.JS--%>
        <script src="/bootstrap/js/bootstrap.min.js"></script>
    </head>
    <body>
        <div id="div1">
            <table id="mytable" border="1px" class="table-primary">
                <thead>
                <th>员工编号</th>
                <th>员工姓名</th>
                <th>员工职位</th>
                <th>员工上司</th>
                <th>员工薪水</th>
                <th>就职时间</th>
                <th>年终奖金</th>
                <th>所在部门</th>
                </thead>
                <tbody>
                <c:forEach items="${allEmp}" var="emp">
                    <tr class="table-primary">
                        <td class="table-secondary">${emp.empno}</td>
                        <td class="table-active">${emp.ename}</td>
                        <td class="table-success">${emp.job}</td>
                        <td>${emp.dept.deptMgr}</td>
                        <td>${emp.sal}</td>
                        <td>${emp.hiredate}</td>
                        <td>${emp.comm}</td>
                        <td>${emp.dept.deptName}</td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <%-- 主要是行数不确定,列数知道--%>
    </body>
</html>
